package com.example.tliasmanagement.service;

import com.example.tliasmanagement.dto.AddEmpDto;
import com.example.tliasmanagement.dto.EmpListDto;
import com.example.tliasmanagement.dto.LoginDto;
import com.example.tliasmanagement.dto.UpdateEmpDto;
import com.example.tliasmanagement.vo.EmpListVo;
import com.example.tliasmanagement.vo.EmpVo;
import com.example.tliasmanagement.vo.LoginResultVo;
import com.example.tliasmanagement.vo.PageBean;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface EmpService {

    PageBean<EmpListVo> emps(EmpListDto dto);

    @Transactional(rollbackFor = Exception.class)
    void addEmp(AddEmpDto dto);

    void deleteEmps(List<Integer> ids);

    EmpVo getById(Integer id);

    void updateEmp(UpdateEmpDto dto);

    LoginResultVo login(LoginDto dto);

    List<EmpVo> getEmpNames();
}
